﻿using System;

public static class ActionExt
{
    public static Func<ValueTuple> ToFunc(this Action action)
    {
        Func<ValueTuple> func = () => { action(); return new ValueTuple(); };
        return func;
    }
    public static Func<T, ValueTuple> ToFunc<T>(this Action<T> action)
    {
        Func<T, ValueTuple> func = (t) => { action(t); return new ValueTuple(); };
        return func;
    }
    public static Func<T1, T2, ValueTuple> ToFunc<T1, T2>(this Action<T1, T2> action)
    {
        Func<T1, T2, ValueTuple> func = (t1, t2) => { action(t1, t2); return new ValueTuple(); };
        return func;
    }
}

